using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_StockPlaceGroupMap : EntityTypeConfiguration<t_StockPlaceGroup>
    {
        public t_StockPlaceGroupMap()
        {
            // Primary Key
            this.HasKey(t => t.FSPGroupID);

            // Properties
            this.Property(t => t.FSPGroupID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FNumber)
                .IsRequired()
                .HasMaxLength(80);

            this.Property(t => t.FName)
                .IsRequired()
                .HasMaxLength(80);

            // Table & Column Mappings
            this.ToTable("t_StockPlaceGroup");
            this.Property(t => t.FSPGroupID).HasColumnName("FSPGroupID");
            this.Property(t => t.FNumber).HasColumnName("FNumber");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FDefaultSPID).HasColumnName("FDefaultSPID");
            this.Property(t => t.FDeleted).HasColumnName("FDeleted");
            this.Property(t => t.UUID).HasColumnName("UUID");
        }
    }
}
